<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
      xmlns:p="http://primefaces.org/ui"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:head>
        <h:outputStylesheet library="css" name="style.css"/>
    </h:head>
    <h:body>
        <div id="outer">
            <div id="wrapper">
                <div id="body-bot">
                    <div id="body-top">
                        <div id="logo">
                            <h1>TRANSPORTATION SERVICE</h1>
                            <p>We care about your cargo</p>
                        </div>
                        <div id="nav">
                            <ul>
                                <li><a href="Home.xhtml">Home</a></li>
                                <li><a href="index9.xhtml">SERVICES</a></li>
                                <li><a href="#">CONTACT US</a></li>
                                <li><a href="#">ABOUT US</a></li>
                            </ul>
                            <div class="clear"> </div>
                        </div>
                        

                        <div class="greybox" id="page1">
                            <br/>
                            
                            <br/>
                            <br/>
                            <h:form>
                                <center>
                                    <b>From:</b><br/>
                                    <h:inputText value="#{resultGetbean.from}" class="textInput" /><br/>
                                    <b>To:</b><br/>
                                    <h:inputText  value="#{resultGetbean.to}" class="textInput">
                                        <f:validateLength minimum="2"/>
                                    </h:inputText><br/>
                                    <h:commandButton action="#{resultGetbean.getresult()}"  value="Map"/>
                                    <p:commandButton oncomplete="openMyDiv()"  styleClass="vote" value="Search"  />
                                </center> 
                            </h:form>
                        </div>
                        
                        <div id="gbox">

                            <h2>  From:
                                <h:outputText value="#{resultGetbean.getpointfromo()}"/>
                            
                            <br/>
                            Route
                            <h:outputText value="#{resultGetbean.getpointroute()}"/>
                            <br/>
                            To:
                            <h:outputText value="#{resultGetbean.getpointto()}"/></h2>

                        </div>
                        
                        
                        <div  id="page2" class="greybox" >
                            <br/><br/><br/>
                            <p:dataTable value="#{resultbean.list}" id="tbl" var="userList" paginator="true" rows="10">  
                                <p:column>  
                                    <f:facet name="header">  
                                        <h:outputText value="How to arrive" />  
                                    </f:facet>  
                                    <h:outputText value="#{userList.email}" />  
                                </p:column>  
                              
                            </p:dataTable> 
                          <p:commandButton oncomplete="openMyDiv1()"  value="Back"  />
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div id="copyright"> &copy; Copyright information goes here. All rights reserved | designed by <a href="http://www.freewebsitetemplates.com">free website templates</a></div>
        <h:outputScript library="scripts" name="jquery-1.10.2.min.js"/>
        <h:outputScript library="scripts" name="jquery-migrate-1.2.1.min.js"/>

        <script type='text/javascript'>
            var $jq = jQuery.noConflict(true);

            $(document).ready(function() {
//                alert("nohssa");
                document.getElementById("page2").style.display = "none"
            }
            );
            function openMyDiv() {
//                alert("noha");
                //$("‪#page1").html("Yo!");
                document.getElementById("page1").style.display = "none"
                document.getElementById("page2").style.display = "block"
            }
            function openMyDiv1(){
                document.getElementById("page2").style.display = "none"
                document.getElementById("page1").style.display = "block"
            }
        </script>
    </h:body>
</html>
